package ro.imc.rest.client.display.util;

public final class MessageConstants {
	//config constants
	public static final String CONF_ERR_TITLE = "Configuration error!";
	public static final String CONF_ERR_MESSAGE = "An unexpected error occured while loading the configuration";
	public static final String CONF_ERR_HTML = "An unexpected error occured while loading the configuration";
	public static final String CONF_ERR_TIP = "Please check if 'rest.conf' is under /ro/imc/rest folder!";
	
	//infrastructure constants
	public static final String INFR_ERR_TITLE = "Infrastructure error!";
	public static final String INFR_ERR_MESSAGE = "An unexpected error occured while testing the Infrastructure";
	public static final String INFR_ERR_HTML = "An unexpected error occured while testing the Infrastructure";
	public static final String INFR_ERR_TIP = "Please check if 'rest.conf' has the property key 'resturl' defined!";
	
	//login constants
	public static final String LOGIN_ERR_TITLE = "Login failed!";
	public static final String LOGIN_ERR_MESSAGE = "Cannot log into the CLIX Rest API with the user: &user&";
	public static final String LOGIN_ERR_HTML = "Cannot log into the CLIX Rest API with the user: <b> &user& </b>";
	public static final String LOGIN_ERR_TIP = "Please retype your password or check if the user has the rights to use CLIX Rest Api!";
	
	//restApi communication
	public static final String REST_ERR_TITLE = "Connection  failed!";
	public static final String REST_ERR_MESSAGE = "The connection could not be established!!";
	public static final String REST_ERR_TIP = "Please retry later to access CLIX REST API";
	
	public static String getLoginErrMessage(String user) {
		return LOGIN_ERR_MESSAGE.replace("&user&", user);
	}
	public static String getLoginErrHtml(String user) {
		return LOGIN_ERR_HTML.replace("&user&", user);
	}
}
